package Decorator;

import Decorator.impl.Circle;
import Decorator.impl.Rectangle;
import Decorator.impl.RedShapeDecorator;
import Decorator.service.Shape;
import Decorator.service.ShapeDecorator;

/**
 * @author chengjunjie
 * @date 2025-09-10
 */

public class DecoratorDemo {
    public static void main(String[] args) {
        Shape circle=new Circle();
        ShapeDecorator redCircle=new RedShapeDecorator(new Circle());
        ShapeDecorator redRectangle=new RedShapeDecorator(new Rectangle());

        System.out.println("++++++++");
        circle.draw();
        System.out.println("++++++++");
        redRectangle.draw();
        System.out.println("++++++++");
        redCircle.draw();
    }
}
